package fanxing;

/**
 *
 */
public class T_fanxing <T1,T2>{
    T1 a;
    T2 b;
    public T1 getA() {
        return a;
    }
    public void setA(T1 a) {
        this.a = a;
    }
    public T2 getB() {
        return b;
    }
    public void setB(T2 b) {
        this.b = b;
    }
    public static void main(String[] args){
        T_fanxing<Integer,Float> f1=new T_fanxing<>();
        //Integer,Float首字母大写表示对象类型，而用泛型必须用对象类型
           //小写表示基本类型
        f1.setA(45);
        f1.setB(26.3f);
        int a=f1.getA();
        float b=f1.getB();
        System.out.println(a+"     "+b);
    }
}
